package com.box.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DbAdviceExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DbAdviceExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAdvidIsNull() {
            addCriterion("advid is null");
            return (Criteria) this;
        }

        public Criteria andAdvidIsNotNull() {
            addCriterion("advid is not null");
            return (Criteria) this;
        }

        public Criteria andAdvidEqualTo(Integer value) {
            addCriterion("advid =", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidNotEqualTo(Integer value) {
            addCriterion("advid <>", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidGreaterThan(Integer value) {
            addCriterion("advid >", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidGreaterThanOrEqualTo(Integer value) {
            addCriterion("advid >=", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidLessThan(Integer value) {
            addCriterion("advid <", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidLessThanOrEqualTo(Integer value) {
            addCriterion("advid <=", value, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidIn(List<Integer> values) {
            addCriterion("advid in", values, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidNotIn(List<Integer> values) {
            addCriterion("advid not in", values, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidBetween(Integer value1, Integer value2) {
            addCriterion("advid between", value1, value2, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvidNotBetween(Integer value1, Integer value2) {
            addCriterion("advid not between", value1, value2, "advid");
            return (Criteria) this;
        }

        public Criteria andAdvtitleIsNull() {
            addCriterion("advtitle is null");
            return (Criteria) this;
        }

        public Criteria andAdvtitleIsNotNull() {
            addCriterion("advtitle is not null");
            return (Criteria) this;
        }

        public Criteria andAdvtitleEqualTo(String value) {
            addCriterion("advtitle =", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleNotEqualTo(String value) {
            addCriterion("advtitle <>", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleGreaterThan(String value) {
            addCriterion("advtitle >", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleGreaterThanOrEqualTo(String value) {
            addCriterion("advtitle >=", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleLessThan(String value) {
            addCriterion("advtitle <", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleLessThanOrEqualTo(String value) {
            addCriterion("advtitle <=", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleLike(String value) {
            addCriterion("advtitle like", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleNotLike(String value) {
            addCriterion("advtitle not like", value, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleIn(List<String> values) {
            addCriterion("advtitle in", values, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleNotIn(List<String> values) {
            addCriterion("advtitle not in", values, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleBetween(String value1, String value2) {
            addCriterion("advtitle between", value1, value2, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAdvtitleNotBetween(String value1, String value2) {
            addCriterion("advtitle not between", value1, value2, "advtitle");
            return (Criteria) this;
        }

        public Criteria andAidIsNull() {
            addCriterion("aid is null");
            return (Criteria) this;
        }

        public Criteria andAidIsNotNull() {
            addCriterion("aid is not null");
            return (Criteria) this;
        }

        public Criteria andAidEqualTo(Integer value) {
            addCriterion("aid =", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotEqualTo(Integer value) {
            addCriterion("aid <>", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidGreaterThan(Integer value) {
            addCriterion("aid >", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidGreaterThanOrEqualTo(Integer value) {
            addCriterion("aid >=", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidLessThan(Integer value) {
            addCriterion("aid <", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidLessThanOrEqualTo(Integer value) {
            addCriterion("aid <=", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidIn(List<Integer> values) {
            addCriterion("aid in", values, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotIn(List<Integer> values) {
            addCriterion("aid not in", values, "aid");
            return (Criteria) this;
        }

        public Criteria andAidBetween(Integer value1, Integer value2) {
            addCriterion("aid between", value1, value2, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotBetween(Integer value1, Integer value2) {
            addCriterion("aid not between", value1, value2, "aid");
            return (Criteria) this;
        }

        public Criteria andAdvimgIsNull() {
            addCriterion("advimg is null");
            return (Criteria) this;
        }

        public Criteria andAdvimgIsNotNull() {
            addCriterion("advimg is not null");
            return (Criteria) this;
        }

        public Criteria andAdvimgEqualTo(String value) {
            addCriterion("advimg =", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgNotEqualTo(String value) {
            addCriterion("advimg <>", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgGreaterThan(String value) {
            addCriterion("advimg >", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgGreaterThanOrEqualTo(String value) {
            addCriterion("advimg >=", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgLessThan(String value) {
            addCriterion("advimg <", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgLessThanOrEqualTo(String value) {
            addCriterion("advimg <=", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgLike(String value) {
            addCriterion("advimg like", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgNotLike(String value) {
            addCriterion("advimg not like", value, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgIn(List<String> values) {
            addCriterion("advimg in", values, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgNotIn(List<String> values) {
            addCriterion("advimg not in", values, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgBetween(String value1, String value2) {
            addCriterion("advimg between", value1, value2, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvimgNotBetween(String value1, String value2) {
            addCriterion("advimg not between", value1, value2, "advimg");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeIsNull() {
            addCriterion("advdescribe is null");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeIsNotNull() {
            addCriterion("advdescribe is not null");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeEqualTo(String value) {
            addCriterion("advdescribe =", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeNotEqualTo(String value) {
            addCriterion("advdescribe <>", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeGreaterThan(String value) {
            addCriterion("advdescribe >", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeGreaterThanOrEqualTo(String value) {
            addCriterion("advdescribe >=", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeLessThan(String value) {
            addCriterion("advdescribe <", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeLessThanOrEqualTo(String value) {
            addCriterion("advdescribe <=", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeLike(String value) {
            addCriterion("advdescribe like", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeNotLike(String value) {
            addCriterion("advdescribe not like", value, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeIn(List<String> values) {
            addCriterion("advdescribe in", values, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeNotIn(List<String> values) {
            addCriterion("advdescribe not in", values, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeBetween(String value1, String value2) {
            addCriterion("advdescribe between", value1, value2, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andAdvdescribeNotBetween(String value1, String value2) {
            addCriterion("advdescribe not between", value1, value2, "advdescribe");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIsNull() {
            addCriterion("updatetime is null");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIsNotNull() {
            addCriterion("updatetime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeEqualTo(Date value) {
            addCriterion("updatetime =", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotEqualTo(Date value) {
            addCriterion("updatetime <>", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeGreaterThan(Date value) {
            addCriterion("updatetime >", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("updatetime >=", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeLessThan(Date value) {
            addCriterion("updatetime <", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
            addCriterion("updatetime <=", value, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeIn(List<Date> values) {
            addCriterion("updatetime in", values, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotIn(List<Date> values) {
            addCriterion("updatetime not in", values, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeBetween(Date value1, Date value2) {
            addCriterion("updatetime between", value1, value2, "updatetime");
            return (Criteria) this;
        }

        public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
            addCriterion("updatetime not between", value1, value2, "updatetime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}